import axios from '../request'
export const findByPageApi = (page) => axios.get("/api/v2/pub/house_loan_batch/selectByPage", {
    params: {
        "page": page
    }

})

export const findByName = (key, page) => axios.get("/api/v2/pub/house_loan_batch/selectByName", {
    params: {
        "page": page,
        "key": key
    }

})


export const deleteByIdApi = (id) => axios.get("/api/v2/pub/house_loan_batch/deleteById", {
    params: {
        "id": id
    }

})


export const updateAPi = (id, name) => axios.post("/api/v2/pub/house_loan_batch/update", {
    "id": id,
    "name": name
})

export const exportExcel = (name, key) => axios.post("/api/v2/pub/house_loan_batch/exportExcel", {
    "name": name,
    "key": key
}, {
    responseType: 'blob'

})

export const exportWord = (name, key) => axios.post("/api/v2/pub/house_loan_batch/exportWord", {
    "name": name,
    "key": key
}, {
    responseType: 'blob'
})

export const exportZip = (name, key) => axios.post("/api/v2/pub/house_loan_batch/exportZip", {
        "name": name,
        "key": key
    }, {
        responseType: 'blob'
    })
    //个人有抵押无担保
export const exportWord_1 = (name, key) => axios.post("/api/v2/pub/house_loan_batch/exportWord_1", {
    "name": name,
    "key": key
}, {
    responseType: 'blob'
})

export const exportZip_1 = (name, key) => axios.post("/api/v2/pub/house_loan_batch/exportZip_1", {
        "name": name,
        "key": key
    }, {
        responseType: 'blob'
    })
    //个人有抵押有担保
export const exportWord_2 = (name, key) => axios.post("/api/v2/pub/house_loan_batch/exportWord_2", {
    "name": name,
    "key": key
}, {
    responseType: 'blob'
})

export const exportZip_2 = (name, key) => axios.post("/api/v2/pub/house_loan_batch/exportZip_2", {
    "name": name,
    "key": key
}, {
    responseType: 'blob'
})


// 夫妻
export const exportWord_3 = (name, key) => axios.post("/api/v2/pub/house_loan_batch/exportWord_3", {
    "name": name,
    "key": key
}, {
    responseType: 'blob'
})

export const exportZip_3 = (name, key) => axios.post("/api/v2/pub/house_loan_batch/exportZip_3", {
    "name": name,
    "key": key
}, {
    responseType: 'blob'
})